<?php
/**
 * IG_Product_Notice_Zxy
 *
 * @author maomao.thx@gmail.com
 * @copyright Copyright (c) 2009 Green Shore (http://www.iwgame.com)
 * @version $Id: Zxy.php 524 2011-05-24 01:44:20Z mmxie $
 */
class IG_Product_Notice_Zxy
{
    protected $_table = 't_user_mail';

    protected $_sender = array(
        'id' => 0,
        'name' => '系统邮件',
    );

    protected $_recv = array();

    protected $_haveaccessory = 0;

    protected $_accessory = 0;

    protected $_title = null;

    protected $_content = null;

    /**
     *
     * @param string $title
     * @param string $content
     * @param array $recv
     */
    public function __construct($title, $content, $recv)
    {
        $this->_title = $title;
        $this->_content = $content;
        $this->_recv = $recv;
    }

    public function toArray()
    {
        $array = array(
            'table' => $this->_table,
            'limittime' => strtotime('2019-02-15'),
            'starttime' => time(),
            'haveaccessory' => 0,
            'accessory' => 0,
            'title' => iconv('utf-8', 'gbk', $this->_title),
            'content' => iconv('utf-8', 'gbk', $this->_content),
            'recvid' => $this->_recv['id'],
            'recvname' => $this->_recv['name'],
            'senderid' => $this->_sender['id'],
            'sendername' => iconv('utf-8', 'gbk', $this->_sender['name'])
        );

        return $array;
    }
}